/*
 * Copyright (c) 2006, 2022, webrx.cn All rights reserved.
 *
 */
package cn.webrx.chat;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.ServerSocket;
import java.net.Socket;

/**
 * <p>Project: javase2203 - S
 * <p>Powered by webrx On 2022-08-09 09:14:42
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class S {
    public static void main(String[] args) {

        try{
            ServerSocket s = new ServerSocket(66);
            while(true) {
                Socket ss = s.accept();
                BufferedReader reader = new BufferedReader(new InputStreamReader(ss.getInputStream()));
                try{
                    System.out.printf("有人连线[%s]%n",reader.readLine());
                }catch(Exception e){

                }
                //ss.close();
            }
        }catch(Exception e){
            e.printStackTrace();
        }
    }
}
